package com.micai.asyn.test;

/**
 * @ClassName ExecutorDemoClient
 * @Description 客户端模拟
 * @Author zhaoxinguo
 * @Date 2018/11/23 12:49
 * @Version 1.0
 **/
public class ExecutorDemoClient {

    public static void main(String [] args) {
        boolean b = task2();
        if (b) {
            task3();
        }
        System.out.println("---------- main end ----------");
    }

    static boolean task2() {
        ExecutorDemoTest executorDemoTest = new ExecutorDemoTest();
        executorDemoTest.asynTask();
        System.out.println("---------- task2 end ----------");
        return true;
    }

    static void task3() {
        int j = 0;
        while (true) {
            if (j++ >1000) {
                break;
            }
        }
        System.out.println("---------- task3 end ----------");
    }
}
